<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ViewEvents.ascx.cs" Inherits="ViewEvents" %>
    <h3>Calendar of Events</h3>
    <div >
        <asp:Panel ID="pnlCalendar" runat="server" Visible="True" 
            DefaultButton="btnSearchEvents">
            <asp:LinkButton ID="lblEvent" runat="server" onclick="lblEvent_Click" 
                Visible="False"></asp:LinkButton>
            <br />
            <asp:Label ID="Label1" runat="server" 
                Text="Enter a keyword to search the events with:"></asp:Label>
            <asp:TextBox ID="txtEventKeyword" runat="server"></asp:TextBox>
            <asp:Button ID="btnSearchEvents" runat="server" onclick="btnSearchEvents_Click" 
                Text="Search" ValidationGroup="vgEventSearch" />
            <br />
            <asp:Calendar ID="calEvents" runat="server" BackColor="White" 
                BorderColor="#3366CC" BorderWidth="1px" CellPadding="1" 
                DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" 
                ForeColor="#003399" Height="409px" ondayrender="calEvents_DayRender" 
                Width="476px">
                <SelectedDayStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                <WeekendDayStyle BackColor="#CCCCFF" />
                <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                <OtherMonthDayStyle ForeColor="#999999" />
                <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                <TitleStyle BackColor="#003399" BorderColor="#3366CC" BorderWidth="1px" 
                    Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF" Height="25px" />
            </asp:Calendar>
        </asp:Panel>
        <asp:Panel ID="pnlEventDetails" runat="server" Visible="false" 
            DefaultButton="btnBackToSearch">
            Event Details<br />
            <asp:Button ID="btnBack" runat="server" onclick="btnBack_Click" 
                Text="&lt;&lt; Back to Calendar" ValidationGroup="vgEventDetails" />
            &nbsp;<asp:Button ID="btnBackToSearch" runat="server" 
                Text="&lt;&lt; Back to search results" Visible="False" 
                onclick="btnBackToSearch_Click" ValidationGroup="vgEventDetails" />
            <br />
            <table>
                <tr>
                    <td>
                        <asp:Label ID="lblTitle" runat="server" Text="Title:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblTitleText" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblDate" runat="server" Text="Date:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblDateText" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblTime" runat="server" Text="Time:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblTimeText" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblLocation" runat="server" Text="Location:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblLocationText" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblContact" runat="server" Text="Contact:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblContactName" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        <asp:Label ID="lblContactPhone" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblDescription" runat="server" Text="Description:"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblDescriptionText" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="pnlSearchResults" runat="server" Visible="false" 
            DefaultButton="btnBackfromResults">
            Event Search<br />
            <b>Search Results:</b><br />
            <asp:Button ID="btnBackfromResults" runat="server" onclick="btnBack_Click" 
                Text="&lt;&lt; Back to Calendar" ValidationGroup="vgEventDetails" />
            <br />
            <asp:ListView ID="lvSearchResults" runat="server">
        <LayoutTemplate>
            <table id="itemPlaceholderContainer" runat="server" >
                <tr id="itemPlaceholder" runat="server">
                </tr>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr class="listview">
                <td>
                    Title:
                </td>
                <td>
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Date:
                </td>
                <td>
                    <asp:Label ID="lblDatePosted" runat="server" Text='<%# Eval("dateTime") %>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    Description:
                </td>
                <td>
                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("Description") %>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp
                </td>
                <td>
                    <asp:Button ID="btnToDetails" runat="server" Text="View details" OnClick="btnToDetails_Click" ValidationGroup="EventSearchResults" CommandArgument='<%# Eval("EventID") %>' />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp
                </td>
                <td>
                    &nbsp
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
        </asp:Panel>
    </div>